//
//  AXFModelManager.h
//  AXFEightGroup
//
//  Created by ya on 12/22/16.
//  Copyright © 2016 ya. All rights reserved.
//

#import <Foundation/Foundation.h>


@class AXFDataModel;

NS_ASSUME_NONNULL_BEGIN
typedef void(^ModelsBlock)(NSArray<AXFDataModel  *> * _Nullable models);


#define _ModelMgr           ([AXFModelManager sharedManager])
#define AXFProductCancelNotification        @"AXFProductCancelNotification"


@interface AXFModelManager : NSObject

#pragma mark - 属性

@property (class, nonatomic, strong, readonly) AXFModelManager  *sharedManager;
@property (nonatomic, strong, readonly) NSArray<AXFDataModel *> *productList;
@property (nonatomic, assign, readonly) CGFloat                 productTotalPrice;
@property (nonatomic, assign, readonly) NSInteger               productTotalAmount;


#pragma mark -


#pragma mark - 数据获取接口

- (void)productListAddModel:(AXFDataModel *)model;

- (void)productListRemoveModel:(AXFDataModel *)model;

- (void)order_goods:( void(^)(NSArray<NSArray<AXFDataModel *> *> *  _Nullable models) )block;


- (void)loadOrderData:(ModelsBlock)block;

- (void)homeData:(void(^)(NSArray<NSArray<AXFDataModel *> *> *models))block;


- (void)adverts:(ModelsBlock)block;

- (void)focus:(ModelsBlock)block;

- (void)icons:(ModelsBlock)block;

- (void)activities:(ModelsBlock)block;

- (void)firstSells:(ModelsBlock)block;

- (void)helps:(ModelsBlock)block;

- (void)mine:(void(^)(NSArray<NSArray *> *mineModels))block;

- (void)myAdress:(ModelsBlock)block;

- (void)myCoupon:(ModelsBlock)block;

- (void)myOrders:(ModelsBlock)block;

- (void)promotions:(ModelsBlock)block;

- (void)searchs:(ModelsBlock)block;

- (void)categories:(ModelsBlock)block;

- (void)products:(void(^)(NSDictionary<NSString *, NSArray<AXFDataModel *> *> * _Nullable models))productsBlock;

//- (void)products:(ModelsBlock)block;

//- (void)supermarket:(ModelsBlock _Nullable)categoriesBlock
//           products:(void(^ _Nullable)(NSDictionary<NSString *, NSArray *> * _Nullable models))productsBlock;

- (void)systemMessages:(ModelsBlock)block;

- (void)userMessage:(ModelsBlock)block;

#pragma mark -

#pragma mark - 测试专区接口


- (void)test;


#pragma mark -

@end

NS_ASSUME_NONNULL_END
